Represents a query that can be used to retrieve information from the database.
Namespace: Microsoft.LearningComponents.Storage
Assembly: Microsoft.LearningComponents.Storage.dll
| C# |
|
public class LearningStoreQuery |
| Name | Description | |
| Ð | AddColumn | Add a new output column in the result. |
| Ð | AddCondition | Add a condition that restricts the data returned in a query. |
| Ð | AddSort | Add a sort order for the returned data |
| Ð | SetParameter | Sets the value for a parameter in a query. |
Steps required to perform a query on a store:
The definition of an query includes:
| C# |
LearningStoreQuery query = store.CreateQuery("UserItem");
query.AddColumn("Name");
|
| C# |
LearningStoreQuery query = store.CreateQuery("UserItem");
query.AddColumn("Id");
query.AddColumn("Name");
query.AddCondition("Name", LearningStoreConditionOperator.LessThan, "Joe");
query.AddSort("Name", LearningStoreSortDirection.Ascending);
|